import { Router } from 'express';
import { CategoryController } from '../controllers/categoryController';

const router = Router();
const categoryController = new CategoryController();

// === 用户端接口（无需认证） ===

// 获取所有分类
router.get('/', categoryController.getAllCategories.bind(categoryController));

// 根据ID获取分类详情
router.get('/:id', categoryController.getCategoryById.bind(categoryController));

export default router; 